﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Docking
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        private int cnt;
        public MainWindow()
        {
            InitializeComponent();
            cnt = 0;
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            cnt++;
            cnt %= 4;
            Ellipse el = new Ellipse();
            el.Width = 20;
            el.Height = 10;
            el.Fill = Brushes.Red;

            switch (cnt)
            {
                case 0: leftPanel.Children.Add(el); break;
                case 1: topPanel.Children.Add(el); break;
                case 2: rightPanel.Children.Add(el); break;
                case 3: bottomPanel.Children.Add(el); break;
            }
        }
    }
}
